Creating A Dashboard

What are Databricks AI/BI dashboards and how are they structured?


  • AI/BI dashboards turn Databricks data into interactive reports. Authors can build charts with SQL or AI assistance, while viewers explore published results.
  • A dashboard has a Data tab for datasets (tables, views, or read-only SQL queries) and one or more canvas pages containing widgets such as visualizations, text, and filters.
  • Datasets are packaged with the dashboard definition when shared or exported; they do not mean that the underlying source tables are copied into the dashboard.
  • A SQL warehouse executes dataset queries; authors need the necessary warehouse and data access privileges.
  • Draft and published versions are separate. Edit the draft freely; republish to expose layout, chart, or filter changes to viewers.

How do you access sample data and create a dashboard?


  • Open Marketplace, search for Simulated Retail Customer Data, review the terms, and select Get instant access if the listing is available to your account.
  • The course dataset appears as received shared data in Catalog Explorer under databricks_simulated_retail_customer_data.v01. The exercises use sales, sales_orders, and customers; availability can vary.
  • Open SQL → Dashboards → Create dashboard, or choose + New → Dashboard, and rename it Retail Dashboard.
  • Open Data → Add data and select databricks_simulated_retail_customer_data.v01.sales_orders and .customers. Adding a normal table commonly creates an editable SELECT * dataset query.
  • Use Create from SQL to define derived datasets; select Run to check the result and give each dataset a descriptive name.
  • Switch to the canvas page, select Add a visualization, click to place it, then use the right-hand configuration panel to choose dataset, chart type, fields, and formatting.
  • Resize or move widgets by dragging them; add a heading with Add a text box and Markdown such as # Retail Organization.

How do you create a sales KPI counter?


  • In Data → Create from SQL, run the following query and name its dataset Count Total Sales:
SELECT
  SUM(total_price) AS Total_Sales,
  3000000 AS Sales_Goal
FROM databricks_simulated_retail_customer_data.v01.sales;
  • On the canvas, add a visualization: Counter; dataset Count Total Sales; Value = Total_Sales; Comparison = Sales_Goal; title Sales Goal.
  • Format the sales value as currency ($) and configure conditional styling such as red when the value is at or below the goal.
  • A counter emphasises one metric and can optionally compare it with a target or previous value.

How do you build charts to analyse sales?


  • Create and run a dataset named Three Month Sales to examine sales from August through October 2019:
SELECT
  customer_name,
  total_price AS Total_Sales,
  date_format(order_date, 'MM') AS Month,
  product_category
FROM databricks_simulated_retail_customer_data.v01.sales
WHERE order_date >= DATE '2019-08-01'
  AND order_date < DATE '2019-11-01';
  • Combo chart: choose Three Month Sales, Month on X, SUM(Total_Sales) as bars and COUNT(*) as a line. Enable dual axis so monetary value and order count have separate scales; format the monetary axis as $.
  • Bar chart: use product_category on X and AVG(Total_Sales) on Y to compare average sale values across categories. Configure measures and aggregation in the right panel.
  • Scatter plot: use dataset sales_orders, order_datetime on X (continuous; daily transformation) and total_price on Y (SUM) to compare sales across dates.
  • Use clear titles, axes, units and aggregations. For example, SUM gives total revenue, AVG gives mean order value and COUNT(*) counts rows.
  • In a visualization’s menu, View visualization query can help inspect the SQL actually used after filters and transformations.

How do you generate or edit visualizations with Databricks AI?


  • Add a visualization and enter a plain-English request such as: Create a bar chart with product_category on the x-axis and average Total_Sales on the y-axis.
  • Review the generated dataset, fields, aggregation and chart. Accept, adjust, or regenerate the result; never assume generated visualizations use the intended measure automatically.
  • Select an existing widget to reopen its configuration panel and edit the dataset, axes, aggregations (SUM, AVG, MIN, etc.), colours or display labels.
  • A stacked bar chart compares contributions within a bar; a dual-axis chart gives two measures different numerical scales. They serve different purposes, and enabling dual axis does not itself make bars stacked.
  • Databricks documentation may label the AI authoring assistant Genie Code; interface labels can differ from course screenshots.

How do you add interactive filters and parameters?


  • In Edit draft, choose Add a filter, place the widget and select a filter type (for example, Single value).
  • For the course example, choose product_category from both the sales and Three Month Sales datasets, enable the title, and label it Product Category.
  • A field filter narrows displayed rows based on selected fields and can apply across multiple datasets/visualizations. Global filters can affect more than one dashboard page.
  • A parameter instead substitutes a selected value into a dataset SQL query at runtime; this is useful when filtering or calculation must happen inside SQL before aggregation.
  • Test that all intended charts respond and that unrelated datasets are not filtered unexpectedly; republish so viewers receive the new controls.

How do you publish, share and refresh a dashboard?


  • Click Publish, choose the data-permission mode, optionally add a message, and confirm. Use Share to grant access to specific users or groups, subject to account policy.
  • Share data permissions run published queries using the publisher’s data permissions; viewers may see results without direct access to source tables. Only publish data appropriate for those viewers.
  • Individual data permissions use each viewer’s own Unity Catalog permissions; users without underlying table or warehouse access may not see a chart. This mode respects viewer-specific row filters and column masks.
  • Sharing privileges such as CAN VIEW, CAN EDIT, or CAN MANAGE determine what recipients can do with the dashboard; these are separate from underlying dataset permissions.
  • Changing draft layout, queries or filters requires republishing. Refreshing data/query results can update an already-published dashboard without republishing.
  • Configure a refresh schedule if automatic updates are required; dashboard visualizations are not inherently live merely because the data source changes.
  • Before sharing broadly, review sensitive data exposure, permissions, query performance, and whether all viewers should see the same information.

What are the main practical tips and limitations?


  • Build datasets first, verify their returned column names and types, then connect visualizations; a chart cannot reference fields missing from its chosen dataset.
  • Use the three-part Unity Catalog name catalog.schema.table to reference data unambiguously.
  • Prefer clear and reusable SQL datasets over repeating complex logic in individual charts; use read-only SELECT queries for dashboard datasets.
  • Validate aggregates and filters against source data, especially when combining tables or comparing totals versus averages.
  • Keep the dashboard uncluttered: put the most important KPIs first, use consistent formatting, and arrange filters near the charts they control.
  • UI names and available controls may change with Databricks releases; if a label differs, look for the equivalent option in the Data, canvas, or widget configuration area.

Where can you find the official instructions?